import platform
from flask import Flask
import os

app = Flask(__name__)


# 分析
@app.route('/oss')
def analyse():
    sys_platform = platform.platform().lower()
    if "windows" in sys_platform:
        print('windows')
        # os.system(r'f:')
        # os.system(r'cd F:/pycode/oss')
        # os.system('python ossdata.py')
    else:
        os.system('cd /data/oss')
        os.system('python3 ossdata.py')
    return '已完成下载分析'


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5666)
